package org.simplextensions.di.data;

import org.simplextensions.annotations.Service;
import org.simplextensions.di.annotations.ServiceDependency;
import org.simplextensions.registry.IServiceRegistry;

@Service(IAnotherFooService.class)
public class AnotherFooService extends BaseFooObject implements IAnotherFooService {
	@ServiceDependency
	private IFooService service;

	// @ServiceDependency
	private NotRegisterService notRegisterService;

	private boolean started;

	public IFooService getService() {
		return service;
	}

	public NotRegisterService getNotRegisterService() {
		return notRegisterService;
	}

	public void setNotRegisterService(NotRegisterService notRegisterService) {
		this.notRegisterService = notRegisterService;
	}

	public void setService(IFooService service) {
		this.service = service;
	}

	public void init(IServiceRegistry serviceRegistry) {
	}

	public boolean isStarted() {
		return started;
	}

	public void start() {
		started=true;
	}

	public void stop() {
		started = false;
	}

}
